package com.waimai.api.model;

import java.io.Serializable;

public class ResponseModel<T> implements Serializable{
	
	public static final int STATUS_SERVER_ERROR = 1;
	public static final int STATUS_REQUEST_SUCCESS = 2;
	public static final int STATUS_REQUEST_FAILED = 3;

	public static final int STATUS_LOGIN_SUCCESS = 11;
	public static final int STATUS_LOGIN_FAILED = 12;
	
	public static final int STATUS_REGIST_SUCCESS = 16;
	public static final int STATUS_REGIST_PHONE_EXTIST = 17;
	public static final int STATUS_REGIST_PHONE_AVALIABLE = 18;
	public static final int STATUS_REGIST_FAILED = 19;
	
	public static final int STATUS_GET_DATA_SUCCESS = 21;
	public static final int STATUS_GET_DATA_NONE = 22;
	
	public static final int STATUS_CHECK_PASSED = 26;
	public static final int STATUS_CHECK_NOT_EXTIST = 27;
	public static final int STATUS_CHECK_NOT_PASSED = 28;
	
	private T data;
	private ResponseStatus status;
	
	public ResponseModel(){
		
	}

	public ResponseModel(T data, int statusCode) {
		super();
		this.data = data;
		this.status = new ResponseStatus(statusCode);
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
	
	public ResponseStatus getStatus() {
		return status;
	}

	public void setStatus(ResponseStatus status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "ResponseModel{" +
				"data=" + data +
				", status=" + status +
				'}';
	}

}
